<el-dialog class="dialogStyleBase" :title="mixinEdit_editTitle" width="800px" :visible.sync="mixinEdit_editVisible"
    :before-close="function(){mixinEdit_editBoxClose('editForm')}" append-to-body>
    <div v-loading="mixinEdit_loading">
        <el-form ref="editForm" :model="form" label-width="100px" label-position="left">

            <LayoutCell>
                <el-form-item label="选择商品" prop="goods_ids" :rules="{ required: true, message: '商品 不能为空'}">
                    <SelectDataGoods v-model="form.goods_ids" :appWindow="appWindow"
                        :apiConfig="$vFN.Tools.getAppGlobalData('componentsApiConfig.SelectDataGoods', appWindow)">
                    </SelectDataGoods>
                </el-form-item>
                <el-form-item label="策略类型" prop="risk_type">
                    <el-radio-group v-model="form.risk_type">
                        <el-radio :label="0">无策略</el-radio>
                        <el-radio :label="1">独立策略</el-radio>
                    </el-radio-group>
                    <div class="text">(备注：无策略，选中商品不会执行风控策略。独立策略，选中商品会执行单独的风控策略。)</div>
                </el-form-item>
                <template v-if="form.risk_type == 1">
                    <el-form-item label="" prop="risk_strategy">
                        <el-radio-group v-model="form.risk_strategy">
                            <el-radio :label="1">产品售价 < 成本价</el-radio>
                            <el-radio :label="2">利润率 < 设定利润率</el-radio>
                        </el-radio-group>
                    </el-form-item>
    
                    <el-form-item label="利润百分比" prop="risk_ratio" :rules="{ required: true, message: '利润百分比 不能为空'}" v-if="form.risk_strategy == 2">
                        <el-input style="width: 200px;" v-model="form.risk_ratio"><template slot="append">%</template></el-input>
                    </el-form-item>
                </template>
                
            </LayoutCell>

        </el-form>
    </div>
    <div slot="footer">
        <el-row>
            <el-col :span="12" style="text-align: left;">
                <el-button @click="mixinEdit_resetForm('editForm')">重 置</el-button>
            </el-col>
            <el-col :span="12">
                <el-button @click="mixinEdit_editBoxClose('editForm')">取 消</el-button>
                <el-button type="primary" @click="mixinEdit_editFormSubmit({model:'form',ref:'editForm'})">确
                    定</el-button>
            </el-col>
        </el-row>
    </div>
</el-dialog>